package org.example.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.example.entity.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 考勤实体类
 */
@Data
@TableName("log_attendance")
public class AttendanceEntity {
    @TableId(type = IdType.AUTO)
    private Long id;//id
    private Long studentId;//学生id
    private Long courseId;//课程id
    private Long teacherId;//教师id
    private String courseTime;//上课时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date aTime;//考勤时间
    private String status;//考勤状态
    @TableField(exist = false)
    private String courseName;
    @TableField(exist = false)
    private String studentName;
    @TableField(exist = false)
    private String studentNum;
    @TableField(exist = false)
    private String studentMajor;
    @TableField(exist = false)
    private String teacherName;
    @TableField(exist = false)
    private String teacherNum;
    @TableField(exist = false)
    private Long pageNum;//页码  当前第几页
    @TableField(exist = false)
    private Long pageSize;//每页多少条
}
